<?php
namespace Products\Model;

class Categories
{
	public $category_id;
	public $category_name;
	public $add_date_time;
	public $c_status;
	public $user_id;
	
	public function exchangeArray($data){
	
		$this->category_id       = (isset($data['category_id']))     ? $data['category_id']	  : null;
		
		$this->category_name     = (isset($data['category_name']))   ? $data['category_name'] : null;
		
		$this->add_date_time     = (isset($data['add_date_time']))   ? $data['add_date_time'] : null;
		
		$this->c_status          = (isset($data['c_status']))        ? $data['c_status']  	  : null;
		
		$this->user_id           = (isset($data['user_id']))          ? $data['user_id']  	  : null;
	}

	// Add the following method:
	public function getArrayCopy()
	{
		return get_object_vars($this);
	}

}